package com.hxzy.task;

import com.xxl.job.core.context.XxlJobHelper;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.log4j.Log4j2;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @Author wy
 * @Description 定时任务
 * @Date 2023/10/16 10:54
 * @Version 1.0
 */
@Log4j2
@Component
public class TestDemoTask {

    /**
     * 简单任务示例（Bean模式）
     * @throws Exception
     */
    @XxlJob("demoJobHandler")
    public void demoJobHandler() throws Exception {
        log.info("XXL-JOB, Hello World.");
    }

}
